#!/usr/bin/env bash


check_PB(){
  proxy_broker=$( which proxybroker )
  if test $proxy_broker -ne ''; then
    echo "Could not find ProxyBroker, Checking pathing."
    if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
      PATH= "$PATH:$HOME/.local/bin:$HOME/bin:"
    fi
    python3 -m pip install proxybroker --user
    export PATH
    echo "I have set your path to: "$PATH
    (nohup $proxy_broker serve serve --host 127.0.0.1 --port 8090 --types HTTPS HTTP --lvl High &) &
  fi
}